package pl.ydp.components.mathcell.components.mathtext
{
	import mx.containers.Canvas;
	import mx.controls.Text;

	public class MathTextCharacter extends Canvas
	{
		public function MathTextCharacter()
		{
			super();
			_text = new Text;
			_text.setStyle("paddingLeft", PADDING_LEFT);
			_text.setStyle("paddingRight", PADDING_RIGHT);
			_text.selectable = false;
			addChild(_text);
		}
		
		private const PADDING_LEFT:Number = -2;
		private const PADDING_RIGHT:Number = -3;
		
		private var _text:Text;
		
		public function set text(value:String):void{
			if (_text.text != value){
				_text.text = value;
			}
		}
		
		public function get text():String{
			return _text.text;
		}
		
	}
}